package com.zxc.dao;

import com.zxc.model.*;
import com.zxc.model.Diseases.DiseasesHistory;
import com.zxc.model.ParkDaily.HealerRecord;
import com.zxc.model.ParkDaily.ParkState;
import com.zxc.model.ParkDetails;

import java.util.List;

public interface UserDao {
     User selectUserById(User user);
    List<User>selectUser(User user);
    List<User>selectUserToPark(User user);
    List<ParkDetails> selectParkByUserId(String userId);
    List<ParkDetails> selectParkByUser(ParkDetails parkDetails);
    ParkState selectPark(ParkState parkState);

/*   这里参考
*           https://blog.csdn.net/edison_03/article/details/77163792
*    如果不这样弄 会报错
*    mybatis动态表名遇见There is no getter for property named 'tableName' in 'class java.lang.String'
*
*    原因:Mybatis默认采用ONGL解析参数，所以会自动采用对象树的形式取string.tableName值，引起报错。
*
* */
    public List<seeds> selectUserSeedsByAccount();
    public List<Tools> selectUserToolsByAccount();
//    public List<Fertilizer> selectUserFertilizerByAccount(@Param(value = "tableName") String tableName);
    public List<Fertilizer> selectUserFertilizerByAccount();
    public List<Pesticide> selectUserPesticideByAccount();





    //管理员总仓库插入数据
    int insertPesticide(Pesticide pesticide);
    int insertPesticideWarehouse(Pesticide pesticide);
    int insertFertilizerWarehouse(Fertilizer fertilizer);
    int insertSeedsWarehouse(seeds seeds);
    int insertToolsWarehouse(Tools tools);
    //用户仓库插入数据
    int insertUserSeedsWarehouse(seeds seeds);
    int insertUserToolsWarehouse(Tools tools);
    int insertUserPesticideWarehouse(Pesticide pesticide);
    int insertUserFertilizerWarehouse(Fertilizer fertilizer);

//    更新子仓库
    int updateUserSeedsWarehouse(seeds seeds);
    int updateUserToolsWarehouse(Tools tools);
    int updateUserPesticideWarehouse(Pesticide pesticide);
    int updateUserFertilizerWarehouse(Fertilizer fertilizer);



    int upDateUserPesticideWarehouseList(List<Pesticide> pesticideslist);
    int upDateUserFertilizerWarehouseList(List<Fertilizer> fertilizerlist);
//    更新总仓库
    int updateSeedsWarehouse(seeds seeds);
    int updateToolsWarehouse(Tools tools);
    int updatePesticideWarehouse(Pesticide pesticide);
    int updateFertilizerWarehouse(Fertilizer fertilizer);
    //用户仓库查询
    List<Tools> selectUserToolsWarehouseByUserId(Tools tools);
    List<seeds> selectUserSeedsWarehouseByUserId(seeds seeds);
    List<Pesticide> selectUserPesticideWarehouseByUserId(Pesticide pesticide);
    List<Fertilizer> selectUserFertilizerWarehouseByUserId(Fertilizer fertilizer);


    //新增：管理员通过传对象，进行查询
    public List<seeds> selectSeedsWarehouseBySeeds(seeds seeds);
    public List<Tools> selectToolsByTools(Tools tools);
    public List<Fertilizer> selectFertilizerByFertilizer(Fertilizer fertilizer);
    public List<Pesticide> selectPesticideByPesticide(Pesticide pesticide);
    //管理人员记录园区日常状态以及治疗物使用记录

    List <HealerRecord>queryHealerRecord(String id);
    List <ParkState>selectParkStateHistory(ParkState parkState);
        //园区日常状态
    int insertParkState(ParkState parkState);
    int updatePark(ParkDetails parkDetails);
        //园区治疗物使用情况
    int insertHealerRecord(HealerRecord healerRecord);


    //插入人员数据
    int insertUserDate(User user);
    //个人工作计划表
        //新增个人工作计划表
    int insertUserPlan(Plan plan);
    int deleteUserPlan(Plan plan);
    List <Plan> selectPlan(Plan plan);
    List <Plan> selectAllPlan(Plan plan);

    //插入病症历史表数据
    int insertDiseasesHistory(DiseasesHistory diseasesHistory);


    List<Fertilizer> selectFertilizer();
    List<Pesticide> selectPesticide();
    List<seeds> selectSeed(seeds vo);





}
